Skip to contentSkip to conversation

Change in openvpn[master]: vlan: Limit -Wconversion override to GCC 10 and older

Openvpn-devel In review flichtenheld (Code Review) 2 participants 11 messages Sep 11, 2025 – Oct 8, 2025 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1757607620000.I73c46ac630834a8cf8894aaa2dcc429fbedd3db7@...2715...

#1 lore raw

Attention is currently required from: plaisthos.

Hello plaisthos,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/1179?usp=email

to review the following change.

Change subject: vlan: Limit -Wconversion override to GCC 10 and older
......................................................................

vlan: Limit -Wconversion override to GCC 10 and older

Only Debian 11 complains about this. This way we know we can remove this at some point.

Change-Id I73c46ac630834a8cf8894aaa2dcc429fbedd3db7

---
M src/openvpn/vlan.c

1 file changed, 3 insertions(+), 2 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/79/1179/1

src/openvpn/vlan.c +3 -2
index 3da470a..f6e2251 100644
@@ -43,7 +43,8 @@
     return ntohs(hdr->pcp_cfi_vid & OPENVPN_8021Q_MASK_VID);
 }
 
-#if defined(__GNUC__) || defined(__clang__)
+/* ~OPENVPN_8021Q_MASK_VID is "int" on old GCC */
+#if defined(__GNUC__) && __GNUC__ < 11
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wconversion"
 #endif
@@ -61,7 +62,7 @@
         (hdr->pcp_cfi_vid & ~OPENVPN_8021Q_MASK_VID) | (htons(vid) & OPENVPN_8021Q_MASK_VID);
 }
 
-#if defined(__GNUC__) || defined(__clang__)
+#if defined(__GNUC__) && __GNUC__ < 11
 #pragma GCC diagnostic pop
 #endif
 

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1179?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I73c46ac630834a8cf8894aaa2dcc429fbedd3db7
Gerrit-Change-Number: 1179
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-MessageType: newchange

#2 lore raw
In reply to a message not in the archive

Attention is currently required from: plaisthos.

Hello plaisthos,

I'd like you to reexamine a change. Please visit

    http://gerrit.openvpn.net/c/openvpn/+/1179?usp=email

to look at the new patch set (#8).

Change subject: vlan: Limit -Wconversion override to GCC 10 and older
......................................................................

vlan: Limit -Wconversion override to GCC 10 and older

Only Debian 11 complains about this. This way we know we can remove this at some point.

Change-Id I73c46ac630834a8cf8894aaa2dcc429fbedd3db7

---
M src/openvpn/vlan.c

1 file changed, 3 insertions(+), 2 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/79/1179/8

src/openvpn/vlan.c +3 -2
index 3da470a..7a9fdaa 100644
@@ -43,7 +43,8 @@
     return ntohs(hdr->pcp_cfi_vid & OPENVPN_8021Q_MASK_VID);
 }
 
-#if defined(__GNUC__) || defined(__clang__)
+/* old GCC complains about ~OPENVPN_8021Q_MASK_VID being "int" */
+#if defined(__GNUC__) && __GNUC__ < 11
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wconversion"
 #endif
@@ -61,7 +62,7 @@
         (hdr->pcp_cfi_vid & ~OPENVPN_8021Q_MASK_VID) | (htons(vid) & OPENVPN_8021Q_MASK_VID);
 }
 
-#if defined(__GNUC__) || defined(__clang__)
+#if defined(__GNUC__) && __GNUC__ < 11
 #pragma GCC diagnostic pop
 #endif
 

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1179?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I73c46ac630834a8cf8894aaa2dcc429fbedd3db7
Gerrit-Change-Number: 1179
Gerrit-PatchSet: 8
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-MessageType: newpatchset

#3 lore raw
In reply to a message not in the archive

Attention is currently required from: flichtenheld, plaisthos.

MaxF has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/1179?usp=email )

Change subject: vlan: Limit -Wconversion override to GCC 10 and older
......................................................................

Patch Set 8: Code-Review+2

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1179?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I73c46ac630834a8cf8894aaa2dcc429fbedd3db7
Gerrit-Change-Number: 1179
Gerrit-PatchSet: 8
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: MaxF <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Wed, 24 Sep 2025 15:10:39 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

#4 lore raw
In reply to a message not in the archive

Attention is currently required from: flichtenheld, plaisthos.

Hello MaxF, plaisthos,

I'd like you to reexamine a change. Please visit

    http://gerrit.openvpn.net/c/openvpn/+/1179?usp=email

to look at the new patch set (#9).

The change is no longer submittable: checks~ChecksSubmitRule is unsatisfied now.

Change subject: vlan: Limit -Wconversion override to GCC 10 and older
......................................................................

vlan: Limit -Wconversion override to GCC 10 and older

Only Debian 11 complains about this. This way we know we can remove this at some point.

Change-Id I73c46ac630834a8cf8894aaa2dcc429fbedd3db7

---
M src/openvpn/vlan.c

1 file changed, 3 insertions(+), 2 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/79/1179/9

src/openvpn/vlan.c +3 -2
index 3da470a..7a9fdaa 100644
@@ -43,7 +43,8 @@
     return ntohs(hdr->pcp_cfi_vid & OPENVPN_8021Q_MASK_VID);
 }
 
-#if defined(__GNUC__) || defined(__clang__)
+/* old GCC complains about ~OPENVPN_8021Q_MASK_VID being "int" */
+#if defined(__GNUC__) && __GNUC__ < 11
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wconversion"
 #endif
@@ -61,7 +62,7 @@
         (hdr->pcp_cfi_vid & ~OPENVPN_8021Q_MASK_VID) | (htons(vid) & OPENVPN_8021Q_MASK_VID);
 }
 
-#if defined(__GNUC__) || defined(__clang__)
+#if defined(__GNUC__) && __GNUC__ < 11
 #pragma GCC diagnostic pop
 #endif
 

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1179?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I73c46ac630834a8cf8894aaa2dcc429fbedd3db7
Gerrit-Change-Number: 1179
Gerrit-PatchSet: 9
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: MaxF <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>

#5 lore raw
In reply to a message not in the archive

Attention is currently required from: flichtenheld, plaisthos.

Hello MaxF, plaisthos,

I'd like you to reexamine a change. Please visit

    http://gerrit.openvpn.net/c/openvpn/+/1179?usp=email

to look at the new patch set (#10).

The change is no longer submittable: checks~ChecksSubmitRule is unsatisfied now.

Change subject: vlan: Limit -Wconversion override to GCC 10 and older
......................................................................

vlan: Limit -Wconversion override to GCC 10 and older

Only Debian 11 complains about this. This way we know we can remove this at some point.

Change-Id I73c46ac630834a8cf8894aaa2dcc429fbedd3db7

---
M src/openvpn/vlan.c

1 file changed, 3 insertions(+), 2 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/79/1179/10

src/openvpn/vlan.c +3 -2
index 3da470a..7a9fdaa 100644
@@ -43,7 +43,8 @@
     return ntohs(hdr->pcp_cfi_vid & OPENVPN_8021Q_MASK_VID);
 }
 
-#if defined(__GNUC__) || defined(__clang__)
+/* old GCC complains about ~OPENVPN_8021Q_MASK_VID being "int" */
+#if defined(__GNUC__) && __GNUC__ < 11
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wconversion"
 #endif
@@ -61,7 +62,7 @@
         (hdr->pcp_cfi_vid & ~OPENVPN_8021Q_MASK_VID) | (htons(vid) & OPENVPN_8021Q_MASK_VID);
 }
 
-#if defined(__GNUC__) || defined(__clang__)
+#if defined(__GNUC__) && __GNUC__ < 11
 #pragma GCC diagnostic pop
 #endif
 

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1179?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I73c46ac630834a8cf8894aaa2dcc429fbedd3db7
Gerrit-Change-Number: 1179
Gerrit-PatchSet: 10
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: MaxF <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>

#6 lore raw

[Openvpn-devel] [XS] Change in openvpn[master]: vlan: Remove -Wconversion override

In reply to a message not in the archive

Attention is currently required from: MaxF, flichtenheld, plaisthos.

Hello MaxF, plaisthos,

I'd like you to reexamine a change. Please visit

    http://gerrit.openvpn.net/c/openvpn/+/1179?usp=email

to look at the new patch set (#11).

The following approvals got outdated and were removed:
Code-Review+2 by MaxF

The change is no longer submittable: Code-Review and checks~ChecksSubmitRule are unsatisfied now.

Change subject: vlan: Remove -Wconversion override
......................................................................

vlan: Remove -Wconversion override

Only Debian 11 (GCC 10) complains about this.
We decided not to add work-arounds for GCC 10
and older and instead accept that they do not
build -Werror clean.

Change-Id I73c46ac630834a8cf8894aaa2dcc429fbedd3db7

---
M src/openvpn/vlan.c

1 file changed, 0 insertions(+), 9 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/79/1179/11

src/openvpn/vlan.c +0 -9
index 3da470a..a6a6e93 100644
@@ -43,11 +43,6 @@
     return ntohs(hdr->pcp_cfi_vid & OPENVPN_8021Q_MASK_VID);
 }
 
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wconversion"
-#endif
-
 /*
  * Set the VLAN Identifier (VID) in an IEEE 802.1Q header.
  *
@@ -61,10 +56,6 @@
         (hdr->pcp_cfi_vid & ~OPENVPN_8021Q_MASK_VID) | (htons(vid) & OPENVPN_8021Q_MASK_VID);
 }
 
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif
-
 /*
  * vlan_decapsulate - remove 802.1q header and return VID
  *

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1179?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I73c46ac630834a8cf8894aaa2dcc429fbedd3db7
Gerrit-Change-Number: 1179
Gerrit-PatchSet: 11
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: MaxF <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Attention: MaxF <[email protected]...>

#7 lore raw

PATCH v11 1/1 vlan: Remove -Wconversion override

In reply to a message not in the archive

From: Frank Lichtenheld <[email protected]...>

Only Debian 11 (GCC 10) complains about this.
We decided not to add work-arounds for GCC 10
and older and instead accept that they do not
build -Werror clean.

Change-Id I73c46ac630834a8cf8894aaa2dcc429fbedd3db7

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1179
---

This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1179
This mail reflects revision 11 of this Change.

Acked-by according to Gerrit (reflected above):

src/openvpn/vlan.c +0 -9
index 3da470a..a6a6e93 100644
@@ -43,11 +43,6 @@
     return ntohs(hdr->pcp_cfi_vid & OPENVPN_8021Q_MASK_VID);
 }
 
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wconversion"
-#endif
-
 /*
  * Set the VLAN Identifier (VID) in an IEEE 802.1Q header.
  *
@@ -61,10 +56,6 @@
         (hdr->pcp_cfi_vid & ~OPENVPN_8021Q_MASK_VID) | (htons(vid) & OPENVPN_8021Q_MASK_VID);
 }
 
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif
-
 /*
  * vlan_decapsulate - remove 802.1q header and return VID
  *
#8 lore raw

[Openvpn-devel] [PATCH applied] Re: vlan: Remove -Wconversion override

v11 is much more to my liking that 1..9 ;-)

Your patch has been applied to the master branch.

(And uuuh, mail-archive.org list returned to functional, yay ;-) ).

commit 5a042b0702c98d5e32889bec2a9b22d2ac3d79bd

Author: Frank Lichtenheld
Date:   Wed Oct 8 12:55:01 2025 +0200
     vlan: Remove -Wconversion override

     Signed-off-by: Frank Lichtenheld <[email protected]...>
     Acked-by: Gert Doering <[email protected]...>
     Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1179
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg33285.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering

#9 lore raw

[Openvpn-devel] [XS] Change in openvpn[master]: vlan: Remove -Wconversion override

In reply to a message not in the archive

Attention is currently required from: MaxF, flichtenheld, plaisthos.

cron2 has posted comments on this change by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1179?usp=email )

Change subject: vlan: Remove -Wconversion override
......................................................................

Patch Set 11: Code-Review+2

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1179?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I73c46ac630834a8cf8894aaa2dcc429fbedd3db7
Gerrit-Change-Number: 1179
Gerrit-PatchSet: 11
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: MaxF <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Attention: MaxF <[email protected]...>
Gerrit-Comment-Date: Wed, 08 Oct 2025 10:55:57 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes

#10 lore raw

[Openvpn-devel] [XS] Change in openvpn[master]: vlan: Remove -Wconversion override

In reply to a message not in the archive

cron2 has uploaded a new patch set (#12) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1179?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by cron2

Change subject: vlan: Remove -Wconversion override
......................................................................

vlan: Remove -Wconversion override

Only Debian 11 (GCC 10) complains about this.
We decided not to add work-arounds for GCC 10
and older and instead accept that they do not
build -Werror clean.

Change-Id I73c46ac630834a8cf8894aaa2dcc429fbedd3db7

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1179
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg33285.html

---
M src/openvpn/vlan.c

1 file changed, 0 insertions(+), 9 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/79/1179/12

src/openvpn/vlan.c +0 -9
index 3da470a..a6a6e93 100644
@@ -43,11 +43,6 @@
     return ntohs(hdr->pcp_cfi_vid & OPENVPN_8021Q_MASK_VID);
 }
 
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wconversion"
-#endif
-
 /*
  * Set the VLAN Identifier (VID) in an IEEE 802.1Q header.
  *
@@ -61,10 +56,6 @@
         (hdr->pcp_cfi_vid & ~OPENVPN_8021Q_MASK_VID) | (htons(vid) & OPENVPN_8021Q_MASK_VID);
 }
 
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif
-
 /*
  * vlan_decapsulate - remove 802.1q header and return VID
  *

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1179?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I73c46ac630834a8cf8894aaa2dcc429fbedd3db7
Gerrit-Change-Number: 1179
Gerrit-PatchSet: 12
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: MaxF <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>

#11 lore raw

[Openvpn-devel] [XS] Change in openvpn[master]: vlan: Remove -Wconversion override

In reply to a message not in the archive

cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1179?usp=email )

Change subject: vlan: Remove -Wconversion override
......................................................................

vlan: Remove -Wconversion override

Only Debian 11 (GCC 10) complains about this.
We decided not to add work-arounds for GCC 10
and older and instead accept that they do not
build -Werror clean.

Change-Id I73c46ac630834a8cf8894aaa2dcc429fbedd3db7

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1179
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg33285.html

---
M src/openvpn/vlan.c

1 file changed, 0 insertions(+), 9 deletions(-)
src/openvpn/vlan.c +0 -9
index 3da470a..a6a6e93 100644
@@ -43,11 +43,6 @@
     return ntohs(hdr->pcp_cfi_vid & OPENVPN_8021Q_MASK_VID);
 }
 
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wconversion"
-#endif
-
 /*
  * Set the VLAN Identifier (VID) in an IEEE 802.1Q header.
  *
@@ -61,10 +56,6 @@
         (hdr->pcp_cfi_vid & ~OPENVPN_8021Q_MASK_VID) | (htons(vid) & OPENVPN_8021Q_MASK_VID);
 }
 
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif
-
 /*
  * vlan_decapsulate - remove 802.1q header and return VID
  *

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1179?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I73c46ac630834a8cf8894aaa2dcc429fbedd3db7
Gerrit-Change-Number: 1179
Gerrit-PatchSet: 12
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: MaxF <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>